#include <iostream>


using namespace std;

/**
 * 角谷猜想
 */
int main(){

    int N;
    cin >> N;


    while(true){
        if (N == 1){
            cout << "End";
            break;
        }

        if (N % 2 == 0){
            cout << N << "/2=" << N / 2 << endl;
            N = N / 2;
        }else{
            cout << N << "*3+1=" << N * 3 + 1 << endl;
            N = 3 * N + 1;
        }
    }


    return 0;
}